<?php
/**
 * Represents a single object.
 *
 * @author Mark Dohmen.
 */
final class Object extends Entity {
	
	/**
	 * Global information about this object.
	 */
	private $objectDefinition;
		
	/**
	 * Class constructor..
	 *
	 * @param $location
	 * @param $objectDefinition
	 */
	final public function Object(Location $location, ObjectDefinition $objectDefinition) {
		parent::$location = $location;
		$this->objectDefinition = $objectDefinition;
	}
	
	/**
	 * Gets the objectDefinition of this object.
	 *
	 * @return $objectDefinition/null
	 */
	final public function getObjectDefinition() {
		if ($this->objectDefinition instanceof ObjectDefinition) {
			return (object) $this->objectDefinition;
		}
		return NULL;
	}
}
?>